package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.WaterUserMapper;
import com.ruoyi.base.domain.WaterUser;
import com.ruoyi.base.service.IWaterUserService;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-28
 */
@Service
public class WaterUserServiceImpl implements IWaterUserService 
{
    @Autowired
    private WaterUserMapper waterUserMapper;

    /**
     * 查询用户信息
     * 
     * @param userId 用户信息主键
     * @return 用户信息
     */
    @Override
    public WaterUser selectWaterUserByUserId(Long userId)
    {
        return waterUserMapper.selectWaterUserByUserId(userId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param waterUser 用户信息
     * @return 用户信息
     */
    @Override
    public List<WaterUser> selectWaterUserList(WaterUser waterUser)
    {
        return waterUserMapper.selectWaterUserList(waterUser);
    }

    /**
     * 新增用户信息
     * 
     * @param waterUser 用户信息
     * @return 结果
     */
    @Override
    public int insertWaterUser(WaterUser waterUser)
    {
        waterUser.setCreateTime(DateUtils.getNowDate());
        return waterUserMapper.insertWaterUser(waterUser);
    }

    /**
     * 修改用户信息
     * 
     * @param waterUser 用户信息
     * @return 结果
     */
    @Override
    public int updateWaterUser(WaterUser waterUser)
    {
        return waterUserMapper.updateWaterUser(waterUser);
    }

    /**
     * 批量删除用户信息
     * 
     * @param userIds 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteWaterUserByUserIds(Long[] userIds)
    {
        return waterUserMapper.deleteWaterUserByUserIds(userIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param userId 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteWaterUserByUserId(Long userId)
    {
        return waterUserMapper.deleteWaterUserByUserId(userId);
    }
}
